Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk: fix context menu computed location #5710

Merged
merged 3 commits into from
Feb 12, 2025

Conversation

AnthonyZhOon
Copy link
Contributor

When a tab bar is displayed, the context menu opened with right click is offset from the cursor.

This was due to using the incorrect coordinate space for describing where to draw the context menu.

gtk_popover_set_pointing_to uses the coordinate space of the popover's parent, however we used the active window's coordinate space which was noticeably different when the tab bar is visible.

Before:
Screenshot_12-Feb_22-39-07_com mitchellh ghostty
After:
Screenshot_12-Feb_22-41-41_com mitchellh ghostty-debug

@AnthonyZhOon AnthonyZhOon requested a review from a team as a code owner February 12, 2025 11:53
Copy link
Contributor

@pluiedev pluiedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch. Makes sense.

@pluiedev
Copy link
Contributor

pluiedev commented Feb 12, 2025

Open to merge if tests pass

EDIT: Nevermind, that's caused by #5644. Merging now.

@pluiedev pluiedev merged commit 76ab671 into ghostty-org:main Feb 12, 2025
29 of 30 checks passed
@github-actions github-actions bot added this to the 1.1.1 milestone Feb 12, 2025
@AnthonyZhOon AnthonyZhOon deleted the tighten-context-menu-popup branch February 13, 2025 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants